package com.cnoja.jmsncn.utils.ui.view;

import java.awt.Component;
import java.awt.Dimension;

public class ViewHelper {

	public static Component referSize(Component component, int minWidth,
			int minHeight) {
		component.setPreferredSize(new Dimension(minWidth, minHeight));

		return component;
	}

	public static Component referSize(Component component, int minWidth,
			int minHeight, int maxWidth, int maxHeight) {
		referSize(component, minWidth, minHeight);
		component.setMaximumSize(new Dimension(maxWidth, maxHeight));
		return component;

	}

}
